Optimal. Leaf size=28 \[ \frac {x}{a}+\frac {\cos (c+d x)}{d (a+a \sin (c+d x))} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.02, antiderivative size = 28, normalized size of antiderivative = 1.00, number of steps
used = 2, number of rules used = 2, integrand size = 19, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.105, Rules used = {2814, 2727}
\begin {gather*} \frac {\cos (c+d x)}{d (a \sin (c+d x)+a)}+\frac {x}{a} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 2727
Rule 2814
Rubi steps
\begin {align*} \int \frac {\sin (c+d x)}{a+a \sin (c+d x)} \, dx &=\frac {x}{a}-\int \frac {1}{a+a \sin (c+d x)} \, dx\\ &=\frac {x}{a}+\frac {\cos (c+d x)}{d (a+a \sin (c+d x))}\\ \end {align*}
________________________________________________________________________________________
Mathematica [B] Leaf count is larger than twice the leaf count of optimal. \(72\) vs. \(2(28)=56\).
time = 0.08, size = 72, normalized size = 2.57 \begin {gather*} \frac {\left (\cos \left (\frac {1}{2} (c+d x)\right )+\sin \left (\frac {1}{2} (c+d x)\right )\right ) \left ((c+d x) \cos \left (\frac {1}{2} (c+d x)\right )+(-2+c+d x) \sin \left (\frac {1}{2} (c+d x)\right )\right )}{a d (1+\sin (c+d x))} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.06, size = 37, normalized size = 1.32
method | result | size |
risch | \(\frac {x}{a}+\frac {2}{d a \left ({\mathrm e}^{i \left (d x +c \right )}+i\right )}\) | \(29\) |
derivativedivides | \(\frac {\frac {4}{2 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )+2}+2 \arctan \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d a}\) | \(37\) |
default | \(\frac {\frac {4}{2 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )+2}+2 \arctan \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d a}\) | \(37\) |
norman | \(\frac {\frac {x}{a}+\frac {x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{a}+\frac {x \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{a}+\frac {x \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{a}+\frac {2}{a d}+\frac {2 \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d a}}{\left (1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}\) | \(109\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.49, size = 50, normalized size = 1.79 \begin {gather*} \frac {2 \, {\left (\frac {\arctan \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1}\right )}{a} + \frac {1}{a + \frac {a \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1}}\right )}}{d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.34, size = 54, normalized size = 1.93 \begin {gather*} \frac {d x + {\left (d x + 1\right )} \cos \left (d x + c\right ) + {\left (d x - 1\right )} \sin \left (d x + c\right ) + 1}{a d \cos \left (d x + c\right ) + a d \sin \left (d x + c\right ) + a d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 80 vs.
\(2 (20) = 40\).
time = 0.62, size = 80, normalized size = 2.86 \begin {gather*} \begin {cases} \frac {d x \tan {\left (\frac {c}{2} + \frac {d x}{2} \right )}}{a d \tan {\left (\frac {c}{2} + \frac {d x}{2} \right )} + a d} + \frac {d x}{a d \tan {\left (\frac {c}{2} + \frac {d x}{2} \right )} + a d} + \frac {2}{a d \tan {\left (\frac {c}{2} + \frac {d x}{2} \right )} + a d} & \text {for}\: d \neq 0 \\\frac {x \sin {\left (c \right )}}{a \sin {\left (c \right )} + a} & \text {otherwise} \end {cases} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 3.43, size = 32, normalized size = 1.14 \begin {gather*} \frac {\frac {d x + c}{a} + \frac {2}{a {\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1\right )}}}{d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.74, size = 27, normalized size = 0.96 \begin {gather*} \frac {x}{a}+\frac {2}{a\,d\,\left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )+1\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________